<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Reference implementation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Reference_implementation"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Reference_implementation rootpage-Reference_implementation skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Reference implementation</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */
.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */
@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}
/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">Look up <i><b><a href="https://en.wiktionary.org/wiki/Special:Search/reference_implementation" class="extiw external" title="wiktionary:Special:Search/reference implementation">reference implementation</a></b></i> in Wiktionary, the free dictionary.</div></div>
</div>
<p>In the <a href="Software_development_process" title="Software development process">software development process</a>, a <b>reference implementation</b> (or, less frequently, <b>sample implementation</b> or <b>model implementation</b>) is a program that implements all requirements from a corresponding specification. The reference implementation often accompanies a <a href="Technical_standard" title="Technical standard">technical standard</a>, and demonstrates what should be considered the "correct" behavior of any other implementation of it.
</p>
<div class="mw-heading mw-heading2"><h2 id="Characteristics_and_examples">Characteristics and examples</h2></div>
<p>Reference implementations of algorithms, for instance <a href="Cryptographic_algorithm" class="mw-redirect" title="Cryptographic algorithm">cryptographic algorithms</a>, are often the result or the input of <a href="Standardization" title="Standardization">standardization</a> processes. In this function they are often dedicated to the <a href="Public_domain" title="Public domain">public domain</a> with their <a href="Source_code" title="Source code">source code</a> as <a href="Public_domain_software" class="mw-redirect" title="Public domain software">public domain software</a>. Examples are the first <a href="CERN_HTTPd" class="mw-redirect" title="CERN HTTPd">CERN's httpd</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> <a href="Serpent_(cipher)" title="Serpent (cipher)">Serpent</a> cipher, <a href="Base64" title="Base64">base64</a> variants,<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and <a href="SHA-3" title="SHA-3">SHA-3</a>.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> The <a href="Openwall_Project" title="Openwall Project">Openwall Project</a> maintains a list of several algorithms with their reference <a href="Source_code" title="Source code">source code</a> in the public domain.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>A reference implementation may or may not be production quality. For example, the <a href="Fraunhofer_Society" title="Fraunhofer Society">Fraunhofer</a> reference implementation of the <a href="MP3" title="MP3">MP3</a> standard usually does not compare favorably to other common implementations, such as <a href="LAME" title="LAME">LAME</a>, in listening tests that determine sound quality.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> In contrast, <a href="CPython" title="CPython">CPython</a>, the reference implementation of the <a href="Python_programming_language" class="mw-redirect" title="Python programming language">Python programming language</a>,<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> is also the implementation most widely used in production.
</p>
<div class="mw-heading mw-heading2"><h2 id="Testing">Testing</h2></div>
<p><a href="Software_testing" title="Software testing">Testing</a> the implementation-vs-specification relationship further enhances the <a href="Product_family_engineering" class="mw-redirect" title="Product family engineering">production</a>'s inter-process efficiencies:
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */
.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}
/* end https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>A reference implementation is, in general, an implementation of a specification to be used as a definitive interpretation for that specification. During the development of the ... conformance test suite, at least one relatively trusted implementation of each interface is necessary to (1) discover errors or ambiguities in the specification, and (2) validate the correct functioning of the test suite.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></p></blockquote>
<blockquote class="templatequote"><p>Characteristics of a Reference Implementation:
</p><ol><li>Developed concurrently with the specification and test suite;</li>
<li>Verifies that specification is implementable;</li>
<li>Enables the test suite to be tested;</li>
<li>Serves as a Gold Standard against which other implementations can be measured;</li>
<li>Helps to clarify the intent of the specification in situations where <a href="Conformance_testing" title="Conformance testing">conformance tests</a> are inadequate<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup></li></ol></blockquote>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFSmithFlückiger" class="citation web cs1">Smith, Tim; Flückiger, François. <a rel="nofollow" class="external text" href="https://home.web.cern.ch/science/computing/birth-web/licensing-web">"Licensing the Web: For everyone"</a>. <i><a href="CERN" title="CERN">CERN</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20211210174700/https://home.web.cern.ch/science/computing/birth-web/licensing-web">Archived</a> from the original on 2021-12-10<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-08-17</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFDevolve2005" class="citation web cs1">Devolve, Chris (2005-11-20). <a rel="nofollow" class="external text" href="https://libb64.sourceforge.net/">"libb64: Base64 Encoding/Decoding Routines"</a>. <i><a href="SourceForge" title="SourceForge">SourceForge</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20100730214031/http://libb64.sourceforge.net:80/">Archived</a> from the original on 2010-07-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-02-06</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFBertoniDaemenPeetersVan_Assche2013" class="citation web cs1">Bertoni, Guido; Daemen, Joan; Peeters, Michaël; Van Assche, Gilles (2013-02-27). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130930182136id_/http://keccak.noekeon.org/KeccakReferenceAndOptimized-3.2.zip">"KeccakReferenceAndOptimized-3.2.zip"</a> <span class="cs1-format">(ZIP)</span>. <i>keccak.noekeon.org</i>. /KeccakReferenceAndOptimized/Sources/mainReference.c. Archived from <a rel="nofollow" class="external text" href="http://keccak.noekeon.org/KeccakReferenceAndOptimized-3.2.zip">the original</a> <span class="cs1-format">(ZIP)</span> on 2013-09-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-02-06</span></span>. <q>The Keccak sponge function, designed by: Bertoni, Guido; Daemen, Joan; Peeters, Michaël; Van Assche, Gilles. For more information, feedback or questions, please refer to our website: keccak.noekeon.org/ / Implementation by the designers, hereby denoted as "the implementer". / To the extent possible under law, the implementer has waived all copyright and related or neighboring rights to the source code in this file. creativecommons.org/publicdomain/zero/1.0/</q></cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFsolar2009" class="citation web cs1">solar (2009-11-05). <a rel="nofollow" class="external text" href="https://openwall.info/wiki/people/solar/software/public-domain-source-code">"Source code snippets and frameworks placed in the public domain"</a>. <i><a href="Openwall_Project" title="Openwall Project">Openwall Community Wiki</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190126164336/https://openwall.info/wiki/people/solar/software/public-domain-source-code">Archived</a> from the original on 2019-01-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-11-16</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFDaulton2019" class="citation web cs1">Daulton, Steve (2019-06-11). <a rel="nofollow" class="external text" href="https://forum.audacityteam.org/t/media-info-doesnt-match-format-options-selected-for-exported-mp3s/53082">"Media Info doesn't match Format Options selected for Exported MP3's - #6 by steve - Windows"</a>. <i>Audacity Forum</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20231202212500/https://forum.audacityteam.org/t/media-info-doesnt-match-format-options-selected-for-exported-mp3s/53082">Archived</a> from the original on 2023-12-02<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-09-05</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFSnow2012" class="citation web cs1">Snow, Eric (2012-04-26). <a rel="nofollow" class="external text" href="https://peps.python.org/pep-0421/#motivation">"PEP 421 – Adding sys.implementation"</a>. <i><a href="Python_(programming_language)" title="Python (programming language)">peps.python.org</a></i>. <a href="Python_Software_Foundation" title="Python Software Foundation">Python Software Foundation</a> (which owns "python.org"). Motivation. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220411231443/https://peps.python.org/pep-0421/#motivation">Archived</a> from the original on 2022-04-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-01-06</span></span>. <q>For a number of years now, the distinction between Python-the-language and CPython (the reference implementation) has been growing. Most of this change is due to the emergence of Jython, IronPython, and PyPy as viable alternate implementations of Python.</q></cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite id="CITEREFDalciFongGoldfine2003" class="citation web cs1">Dalci, Eric; Fong, Elizabeth; Goldfine, Alan (2003-03-26). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20060928231404id_/http://xw2k.sdct.itl.nist.gov/smartcard/document/ref-imp51.pdf">"Requirements for GSC-IS Reference Implementations"</a> <span class="cs1-format">(PDF)</span>. <i><a href="National_Institute_of_Standards_and_Technology#Organization" title="National Institute of Standards and Technology">National Institute of Standards and Technology, Information Technology Laboratory</a></i>. Archived from <a rel="nofollow" class="external text" href="http://xw2k.sdct.itl.nist.gov/smartcard/document/ref-imp51.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2006-09-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2006-07-22</span></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFCurran2003" class="citation web cs1">Curran, Patrick (2003-12-10). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20031219120934id_/http://vote.nist.gov:80/speeches/1%20-%20Specification%20Panel/6%20-%20Curran.pdf">"Conformance Testing: An Industry Perspective"</a> <span class="cs1-format">(PDF)</span>. <i><a href="National_Institute_of_Standards_and_Technology" title="National Institute of Standards and Technology">National Institute of Standards and Technology</a></i>. <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>. Archived from <a rel="nofollow" class="external text" href="http://vote.nist.gov:80/speeches/1%20-%20Specification%20Panel/6%20-%20Curran.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2003-12-19<span class="reference-accessdate">. Retrieved <span class="nowrap">2006-07-22</span></span>.</cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2024-09-06" href="https://en.wikipedia.org/wiki/?title=Reference_implementation&oldid=1244299385">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>